//
//  Application.swift
//  pgy
//
//  Created by vsccw on 2018/12/29.
//  Copyright © 2018 vsccw.com. All rights reserved.
//

import UIKit

class Application {
  
  struct Config {
    static let imagePrefix = "https://appicon.pgyer.com/image/view/app_icons/"
  }
  
  static let shared = Application()
  
  func install(_ app: AppInfo) {
    let urlString = "itms-services://?action=download-manifest&url=https://www.pgyer.com/app/plist/" + app.appKey
    guard let url = URL(string: urlString) else { return }
    UIApplication.shared.openURL(url)
  }
}
